:begin
@echo off


set solutionName=ASPNetAjaxInstaller
set featureSampleFeature1=ASPNetAjaxInstaller




rem ** Replace this value with the URL of your site **
@set url=http://new2003/zz/


@set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;%PATH% 



rem stsadm -o retractsolution   -name %solutionName%.wsp -immediate
rem stsadm -o execadmsvcjobs 
rem stsadm -o deletesolution -name %solutionName%.wsp -override


echo Adding solution %solutionName% to solution store...
echo ----------------------------------------------------

stsadm -o addsolution -filename %solutionName%.wsp
if errorlevel == 0 goto :deploySolution


echo ### Error adding solution %solutionName%
echo .
goto end

:deploySolution
echo Deploying solution %solutionName%...
echo ----------------------------------------------------
rem stsadm -o deploysolution -name %solutionName%.wsp -url %url% -immediate -allowGacDeployment -allowCasPolicies  -force
rem stsadm -o deploysolution -name %solutionName%.wsp -immediate -allowgacdeployment -allowCasPolicies  -force
rem stsadm -o execadmsvcjobs 


if errorlevel == 0 goto :activateFeature

echo ### Error deploying solution %solutionName%
echo .
goto end



:activateFeature


echo Activating features in solution %solutionName%...
echo ----------------------------------------------------

rem stsadm -o activatefeature -name %featureSampleFeature1% -url %url% -force
rem stsadm -o activatefeature -name %featureSampleFeature1% -url %url% -force

if errorlevel == 0 goto :success

echo ### Error activating features
echo .
goto end


:success
echo Successfully deployed solution and activated feature(s)..
echo .
goto end

:end
pause